// pages/home/home.js
const app = getApp();
Page({
  data: {
    city:""
  },
  onLoad(){
    app.callback=()=>{
      var city = wx.getStorageSync('locationCity');
      this.setData({
        city
      })
    }
  },
  handleClick(){
    wx.navigateTo({
      url: '/pages/city/city',
      success: function(res){
        // success
      },
      fail: function() {
        // fail
      },
      complete: function() {
        // complete
      }
    })
  },
  onShow(){
    var city = app.globalData.currentCity;
    this.setData({
      city
    })
  }
})